﻿using ServiceStack.Redis;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RedisHelper.Config
{
    /// <summary>
    /// Redis配置信息
    /// </summary>
    public class RedisConfig
    {

        /// <summary>
        /// 数据读服务器列表
        /// </summary>
        public List<RedisServer> ReadWriteHosts { get; set; }

        /// <summary>
        /// 数据读服务器列表
        /// </summary>
        public List<RedisServer> ReadOnlyHosts { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        /// 链接超时
        /// </summary>
        public int ConnectTimeout { get; set; }

        /// <summary>
        /// 重试次数
        /// </summary>
        public int RetryCount { get; set; }

        /// <summary>
        /// 重试超时
        /// </summary>
        public int RetryTimeout { get; set; }

        /// <summary>
        /// 发送超时
        /// </summary>
        public int SendTimeout { get; set; }

        /// <summary>
        /// 管理器配置
        /// </summary>
        public RedisClientManagerConfig RedisClientManagerConfig { get; set; }

        /// <summary>
        /// Redis服务器
        /// </summary>
        public class RedisServer
        {

            /// <summary>
            /// 服务器地址
            /// </summary>
            public string Host { get; set; }
        }
    }
}
